/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package ms.jasim.model.event;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import ms.jasim.model.ModelPackage;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Modifiable Predicate</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * @see ms.jasim.model.event.EventPackage#getModifiablePredicate()
 * @model
 * @generated
 */
public enum ModifiablePredicate implements Enumerator {
	/**
	 * The '<em><b>Pr satisfies</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PR_SATISFIES_VALUE
	 * @generated
	 * @ordered
	 */
	PR_SATISFIES(0, "pr_satisfies", "pr_satisfies"),

	/**
	 * The '<em><b>Pr passes</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PR_PASSES_VALUE
	 * @generated
	 * @ordered
	 */
	PR_PASSES(1, "pr_passes", "pr_passes"),

	/**
	 * The '<em><b>Pr and decomposes2</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PR_AND_DECOMPOSES2_VALUE
	 * @generated
	 * @ordered
	 */
	PR_AND_DECOMPOSES2(2, "pr_and_decomposes2", "pr_and_decomposes2"),

	/**
	 * The '<em><b>Pr and decomposes3</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PR_AND_DECOMPOSES3_VALUE
	 * @generated
	 * @ordered
	 */
	PR_AND_DECOMPOSES3(3, "pr_and_decomposes3", "pr_and_decomposes3"),

	/**
	 * The '<em><b>Pr or decomposes2</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PR_OR_DECOMPOSES2_VALUE
	 * @generated
	 * @ordered
	 */
	PR_OR_DECOMPOSES2(4, "pr_or_decomposes2", "pr_or_decomposes2"),

	/**
	 * The '<em><b>Pr or decomposes3</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #PR_OR_DECOMPOSES3_VALUE
	 * @generated
	 * @ordered
	 */
	PR_OR_DECOMPOSES3(5, "pr_or_decomposes3", "pr_or_decomposes3"), /**
	 * The '<em><b>Requests</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #REQUESTS_VALUE
	 * @generated
	 * @ordered
	 */
	REQUESTS(6, "requests", "requests"), /**
	 * The '<em><b>Can provide</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #CAN_PROVIDE_VALUE
	 * @generated
	 * @ordered
	 */
	CAN_PROVIDE(7, "can_provide", "can_provide"), /**
	 * The '<em><b>And subgoal2</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #AND_SUBGOAL2_VALUE
	 * @generated
	 * @ordered
	 */
	AND_SUBGOAL2(8, "and_subgoal2", "and_subgoal2"), /**
	 * The '<em><b>And subgoal3</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #AND_SUBGOAL3_VALUE
	 * @generated
	 * @ordered
	 */
	AND_SUBGOAL3(9, "and_subgoal3", "and_subgoal3"), /**
	 * The '<em><b>Or subgoal2</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #OR_SUBGOAL2_VALUE
	 * @generated
	 * @ordered
	 */
	OR_SUBGOAL2(10, "or_subgoal2", "or_subgoal2"), /**
	 * The '<em><b>Or subgoal3</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #OR_SUBGOAL3_VALUE
	 * @generated
	 * @ordered
	 */
	OR_SUBGOAL3(11, "or_subgoal3", "or_subgoal3");

	/**
	 * The '<em><b>Pr satisfies</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Pr satisfies</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PR_SATISFIES
	 * @model name="pr_satisfies"
	 * @generated
	 * @ordered
	 */
	public static final int PR_SATISFIES_VALUE = 0;

	/**
	 * The '<em><b>Pr passes</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Pr passes</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PR_PASSES
	 * @model name="pr_passes"
	 * @generated
	 * @ordered
	 */
	public static final int PR_PASSES_VALUE = 1;

	/**
	 * The '<em><b>Pr and decomposes2</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Pr and decomposes2</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PR_AND_DECOMPOSES2
	 * @model name="pr_and_decomposes2"
	 * @generated
	 * @ordered
	 */
	public static final int PR_AND_DECOMPOSES2_VALUE = 2;

	/**
	 * The '<em><b>Pr and decomposes3</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Pr and decomposes3</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PR_AND_DECOMPOSES3
	 * @model name="pr_and_decomposes3"
	 * @generated
	 * @ordered
	 */
	public static final int PR_AND_DECOMPOSES3_VALUE = 3;

	/**
	 * The '<em><b>Pr or decomposes2</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Pr or decomposes2</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PR_OR_DECOMPOSES2
	 * @model name="pr_or_decomposes2"
	 * @generated
	 * @ordered
	 */
	public static final int PR_OR_DECOMPOSES2_VALUE = 4;

	/**
	 * The '<em><b>Pr or decomposes3</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Pr or decomposes3</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #PR_OR_DECOMPOSES3
	 * @model name="pr_or_decomposes3"
	 * @generated
	 * @ordered
	 */
	public static final int PR_OR_DECOMPOSES3_VALUE = 5;

	/**
	 * The '<em><b>Requests</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Requests</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #REQUESTS
	 * @model name="requests"
	 * @generated
	 * @ordered
	 */
	public static final int REQUESTS_VALUE = 6;

	/**
	 * The '<em><b>Can provide</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Can provide</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #CAN_PROVIDE
	 * @model name="can_provide"
	 * @generated
	 * @ordered
	 */
	public static final int CAN_PROVIDE_VALUE = 7;

	/**
	 * The '<em><b>And subgoal2</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>And subgoal2</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #AND_SUBGOAL2
	 * @model name="and_subgoal2"
	 * @generated
	 * @ordered
	 */
	public static final int AND_SUBGOAL2_VALUE = 8;

	/**
	 * The '<em><b>And subgoal3</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>And subgoal3</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #AND_SUBGOAL3
	 * @model name="and_subgoal3"
	 * @generated
	 * @ordered
	 */
	public static final int AND_SUBGOAL3_VALUE = 9;

	/**
	 * The '<em><b>Or subgoal2</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Or subgoal2</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #OR_SUBGOAL2
	 * @model name="or_subgoal2"
	 * @generated
	 * @ordered
	 */
	public static final int OR_SUBGOAL2_VALUE = 10;

	/**
	 * The '<em><b>Or subgoal3</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Or subgoal3</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #OR_SUBGOAL3
	 * @model name="or_subgoal3"
	 * @generated
	 * @ordered
	 */
	public static final int OR_SUBGOAL3_VALUE = 11;

	/**
	 * An array of all the '<em><b>Modifiable Predicate</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final ModifiablePredicate[] VALUES_ARRAY =
		new ModifiablePredicate[] {
			PR_SATISFIES,
			PR_PASSES,
			PR_AND_DECOMPOSES2,
			PR_AND_DECOMPOSES3,
			PR_OR_DECOMPOSES2,
			PR_OR_DECOMPOSES3,
			REQUESTS,
			CAN_PROVIDE,
			AND_SUBGOAL2,
			AND_SUBGOAL3,
			OR_SUBGOAL2,
			OR_SUBGOAL3,
		};

	/**
	 * A public read-only list of all the '<em><b>Modifiable Predicate</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<ModifiablePredicate> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Modifiable Predicate</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ModifiablePredicate get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ModifiablePredicate result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Modifiable Predicate</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ModifiablePredicate getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			ModifiablePredicate result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Modifiable Predicate</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static ModifiablePredicate get(int value) {
		switch (value) {
			case PR_SATISFIES_VALUE: return PR_SATISFIES;
			case PR_PASSES_VALUE: return PR_PASSES;
			case PR_AND_DECOMPOSES2_VALUE: return PR_AND_DECOMPOSES2;
			case PR_AND_DECOMPOSES3_VALUE: return PR_AND_DECOMPOSES3;
			case PR_OR_DECOMPOSES2_VALUE: return PR_OR_DECOMPOSES2;
			case PR_OR_DECOMPOSES3_VALUE: return PR_OR_DECOMPOSES3;
			case REQUESTS_VALUE: return REQUESTS;
			case CAN_PROVIDE_VALUE: return CAN_PROVIDE;
			case AND_SUBGOAL2_VALUE: return AND_SUBGOAL2;
			case AND_SUBGOAL3_VALUE: return AND_SUBGOAL3;
			case OR_SUBGOAL2_VALUE: return OR_SUBGOAL2;
			case OR_SUBGOAL3_VALUE: return OR_SUBGOAL3;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private ModifiablePredicate(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //ModifiablePredicate
